﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using interop;

namespace leodesigner
{
    public partial class RenderView : WeifenLuo.WinFormsUI.Docking.DockContent
    {
        public RenderView()
        {
            InitializeComponent();
            stopButton.Image=Image.FromFile("designer\\icons\\stop.ico");
            playButton.Image = Image.FromFile("designer\\icons\\play.ico");
            pauseButton.Image = Image.FromFile("designer\\icons\\pause.ico");

            cameramtx = new Transform();
            projectionmtx = new Transform();
        }

        public Transform cameramtx;
        public Transform projectionmtx;

        private void RenderView_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (e.CloseReason == CloseReason.UserClosing)
                e.Cancel = true;
        }

        public Panel RenderPanel
        {
            get { return renderPanel; }
        }

        private void RenderView_SizeChanged(object sender, EventArgs e)
        {
            interop.server.resize_view();
        }

        private void renderPanel_Enter(object sender, EventArgs e)
        {
        }

        private void renderPanel_Leave(object sender, EventArgs e)
        {
        }

        private void RenderView_Enter(object sender, EventArgs e)
        {
        }

        private void RenderView_Leave(object sender, EventArgs e)
        {
        }

        private void stopButton_Click(object sender, EventArgs e)
        {
            designer.Designer.stop();
        }

        private void pauseButton_Click(object sender, EventArgs e)
        {
            designer.Designer.pause();
        }

        private void playButton_Click(object sender, EventArgs e)
        {
            designer.Designer.play();
        }
    }
}
